package com.fac.vo;

import com.fac.json.JacksonObjectMapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 租赁订单VO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "租赁订单返回对象")
public class LeaseOrderVO {

    /**
     * 订单ID
     */
    @ApiModelProperty(value = "订单ID", example = "1")
    private Long orderId;

    /**
     * 订单编号
     */
    @ApiModelProperty(value = "订单编号", example = "L202401010001")
    private String code;

    /**
     * 用户名称
     */
    @ApiModelProperty(value = "用户名称", example = "张三")
    private String userName;

    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称", example = "数控机床")
    private String equipmentName;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间", example = "2024-01-01 12:00:00")
    @JsonFormat(pattern = JacksonObjectMapper.DEFAULT_ALL_DATE_TIME_FORMAT)
    private LocalDateTime startTime;

    /**
     * 预计归还时间
     */
    @ApiModelProperty(value = "预计归还时间", example = "2024-01-05 12:00:00")
    @JsonFormat(pattern = JacksonObjectMapper.DEFAULT_ALL_DATE_TIME_FORMAT)
    private LocalDateTime expectedReturnTime;

    /**
     * 实际归还时间
     */
    @ApiModelProperty(value = "实际归还时间", example = "2024-01-05 14:00:00")
    @JsonFormat(pattern = JacksonObjectMapper.DEFAULT_ALL_DATE_TIME_FORMAT)
    private LocalDateTime actualReturnTime;

    /**
     * 租赁天数
     */
    @ApiModelProperty(value = "租赁天数", example = "5")
    private Integer leaseDays;

    /**
     * 计费类型：日、周、月、年
     */
    @ApiModelProperty(value = "计费类型：日、周、月、年", example = "日")
    private String chargeType;

    /**
     * 租赁费用
     */
    @ApiModelProperty(value = "租赁费用", example = "500.00")
    private BigDecimal leaseFee;

    /**
     * 押金
     */
    @ApiModelProperty(value = "押金", example = "1000.00")
    private BigDecimal deposit;

    /**
     * 订单状态
     */
    @ApiModelProperty(value = "订单状态：0待支付，1租赁中，2已完成，3已取消", example = "1")
    private Integer orderStatus;

    /**
     * 押金状态
     */
    @ApiModelProperty(value = "押金状态：0未退还，1已退还", example = "0")
    private Integer depositStatus;

    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人", example = "张三")
    private String contactPerson;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话", example = "13800138000")
    private String contactPhone;
} 